package com.edu.app.service.impl.linkservices;

import com.edu.app.bean.core.SysContract;
import com.edu.app.bean.core.SysUser;
import com.edu.app.bean.linkbeans.SysUserContract;

import com.edu.app.mapper.linkmappers.SysUserContractMapper;
import com.edu.app.service.impl.SysBaseServiceImpl;
import com.edu.app.service.sys.linkservices.SysUserContractService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SysUserContractServiceImpl extends SysBaseServiceImpl<SysUserContract,SysUserContractMapper> implements SysUserContractService {
    @Autowired
    SysUserContractMapper sysUserContractMapper;



    @Override
    public List<SysContract> getContractByUserId(Integer id){

        List<SysContract> sysContractList = sysUserContractMapper.getContractByUserId(id);
        return sysContractList;
    }

    @Override
    public List<SysUser> getUserByContractId(Integer id){

        List<SysUser> sysUserList = sysUserContractMapper.getUserByContractId(id);
        return sysUserList;
    }

    @Override
    public Integer deleteUserContractByContractId(Integer id){
        return sysUserContractMapper.deleteUserContractByContractId(id);
    }

    @Override
    public Integer deleteUserContractByUserId(Integer id){
        return sysUserContractMapper.deleteUserContractByUserId(id);
    }
}
